<?php
$old_password = array(
	'name'	=> 'old_password',
	'id'	=> 'old_password',
	'value' => set_value('old_password'),
	'size' 	=> 30,
);
$new_password = array(
	'name'	=> 'new_password',
	'id'	=> 'new_password',
	'maxlength'	=> $this->config->item('password_max_length', 'tank_auth'),
	'size'	=> 30,
);
$confirm_new_password = array(
	'name'	=> 'confirm_new_password',
	'id'	=> 'confirm_new_password',
	'maxlength'	=> $this->config->item('password_max_length', 'tank_auth'),
	'size' 	=> 30,
);
?>

<div class="top shadow">
</div>

<div class="content">
	<?=form_open($this->uri->uri_string())?>
	<table id="form-profile-container" cellspacing="20px">
		<tr>
			<th>
				Change your password<br/>
			</th>
			<td>
				<div id="account-info-modify">
				<table class="form-table">
					<tr>
						<td class="label"><?=form_label('Old Password', $old_password['id'])?></td>
						<td><?=form_password($old_password)?></td>
						<td class="form-error"><?=form_error($old_password['name'])?><?=isset($errors[$old_password['name']])?$errors[$old_password['name']]:''?></td>
					</tr>
					<tr>
						<td class="label"><?=form_label('New Password', $new_password['id'])?></td>
						<td><?=form_password($new_password)?></td>
						<td class="form-error"><?=form_error($new_password['name'])?><?=isset($errors[$new_password['name']])?$errors[$new_password['name']]:''?></td>
					</tr>
					<tr>
						<td class="label"><?=form_label('Confirm New Password', $confirm_new_password['id'])?></td>
						<td><?=form_password($confirm_new_password)?></td>
						<td class="form-error"><?=form_error($confirm_new_password['name'])?><?=isset($errors[$confirm_new_password['name']])?$errors[$confirm_new_password['name']]:''?></td>
					</tr>
					<tr>
						<td class="label">&nbsp;</td>
						<td><?=form_submit('change', 'Change password')?>&nbsp;<a href="/user/profile" class="reduced-font">cancel</a></td>
					</tr>
				</table>
				</div>
			</td>
		</tr>
	</table>
	<?=form_close()?>
</div>